Method and apparatus for time alignment of analog and digital pathways in a digital radio receiver

ABSTRACT

A method for processing a radio signal includes producing first and second streams of audio samples; decimating the first and second streams of audio samples to produce first and second streams of decimated streams of audio samples; estimating a first offset value between corresponding samples in the first and second streams of decimated streams of audio samples; shifting one of the first and second streams of audio samples by a first shift value; decimating the first and second streams of audio samples to produce third and fourth streams of decimated audio samples; estimating a second offset value; determining a final offset value based on an intersection of ranges of valid results of the first and second offset values; and shifting one of the first and second streams of audio samples by the final offset value to align the first and second streams of audio samples.

FIELD OF THE DISCLOSURE

The described methods and apparatus relate to digital radio broadcastreceivers and, in particular, to methods and apparatus for timealignment of analog and digital pathways in digital radio receivers.

BACKGROUND INFORMATION

Digital radio broadcasting technology delivers digital audio and dataservices to mobile, portable, and fixed receivers. One type of digitalradio broadcasting, referred to as in-band on-channel (IBOC) digitalaudio broadcasting (DAB), uses terrestrial transmitters in the existingMedium Frequency (MF) and Very High Frequency (VHF) radio bands. HDRadio™ technology, developed by iBiquity Digital Corporation, is oneexample of an IBOC implementation for digital radio broadcasting andreception.

IBOC signals can be transmitted in a hybrid format including an analogmodulated carrier in combination with a plurality of digitally modulatedcarriers or in an all-digital format, wherein the analog modulatedcarrier is not used. Using the hybrid mode, broadcasters may continue totransmit analog AM and FM simultaneously with higher-quality and morerobust digital signals, allowing themselves and their listeners toconvert from analog-to-digital radio while maintaining their currentfrequency allocations.

IBOC technology can provide digital quality audio, superior to existinganalog broadcasting formats. Because each IBOC signal is transmittedwithin the spectral mask of an existing AM or FM channel allocation, itrequires no new spectral allocations. IBOC promotes economy of spectrumwhile enabling broadcasters to supply digital quality audio to thepresent base of listeners.

The National Radio Systems Committee, a standard-setting organizationsponsored by the National Association of Broadcasters and the ConsumerElectronics Association, adopted an IBOC standard, designated NRSC-5, inSeptember 2005. NRSC-5, the disclosure of which is incorporated hereinby reference, sets forth the requirements for broadcasting digital audioand ancillary data over AM and FM broadcast channels. The standard andits reference documents contain detailed explanations of theRF/transmission subsystem and the transport and service multiplexsubsystems. Copies of the standard can be obtained from the NRSC athttp://www.nrscstandards.org/standards.asp. iBiquity's HD Radiotechnology is an implementation of the NRSC-5 IBOC standard. Furtherinformation regarding HD Radio technology can be found atwww.hdradio.com and www.ibiquity.com.

Other types of digital radio broadcasting systems include satellitesystems such as Satellite Digital Audio Radio Service (SDARS, e.g., XMRadio™, Sirius®), Digital Audio Radio Service (DARS, e.g., WorldSpace®),and terrestrial systems such as Digital Radio Mondiale (DRM), Eureka 147(branded as DAB Digital Audio Broadcasting®), DAB Version 2, andFMeXtra®. As used herein, the phrase “digital radio broadcasting”encompasses digital audio and data broadcasting including in-bandon-channel broadcasting, as well as other digital terrestrialbroadcasting and satellite broadcasting.

Both AM and FM In-Band On-Channel (IBOC) broadcasting systems utilize acomposite signal including an analog modulated carrier and a pluralityof digitally modulated subcarriers. Program content (e.g., audio) can beredundantly transmitted on the analog modulated carrier and thedigitally modulated subcarriers. The analog audio is delayed at thetransmitter by a diversity delay.

In the absence of the digital audio signal (for example, when thechannel is initially tuned) the analog AM or FM backup audio signal isfed to the audio output. When the digital audio signal becomesavailable, a blend function smoothly attenuates and eventually replacesthe analog backup signal with the digital audio signal while blending inthe digital audio signal such that the transition preserves somecontinuity of the audio program. Similar blending occurs during channeloutages which corrupt the digital signal. In this case, the analogsignal is gradually blended into the output audio signal by attenuatingthe digital signal such that the audio is fully blended to analog whenthe digital corruption appears at the audio output. Corruption of thedigital audio signal can be detected during the diversity delay timethrough cyclic redundancy check (CRC) error detection means, or otherdigital detection means in the audio decoder or receiver.

The concept of blending between the digital audio signal of an IBOCsystem and the analog audio signal has been previously described in U.S.Pat. Nos. 7,546,088; 6,178,317; 6,590,944; 6,735,257; 6,901,242; and8,180,470, the disclosures of which are hereby incorporated byreference. The diversity delay and blend allow the receiver to fill inthe digital audio gaps with analog audio when digital outages occur. Thediversity delay ensures that the audio output has a reasonable qualitywhen brief outages occur in a mobile environment (for example, when amobile receiver passes under a bridge). This is because the timediversity causes the outages to affect different segments of the audioprogram for the digital and analog signals.

In the receiver, the analog and digital pathways may be separately, andthus asynchronously, processed. In a software implementation, forexample, analog and digital demodulation processes may be treated asseparate tasks using different software threads. Subsequent blending ofthe analog and digital signals requires that the signals be aligned intime before they are blended.

One technique for determining time alignment between signals in digitaland analog pathways performs a correlation between the samples of thetwo audio streams and looks for the peak of the correlation. This mayrequire a large number of multiply operations and a large amount ofmemory.

It would be desirable to have a time alignment detection technique thatcan achieve a desired accuracy with a reduced number of multiplies andreduced memory requirements.

SUMMARY

In a first embodiment, a method for processing a radio signal includesreceiving a radio broadcast signal having an analog portion and adigital portion; separating the analog portion of the radio broadcastsignal from the digital portion of the radio broadcast signal; producinga first stream of audio samples representative of the analog portion ofthe radio broadcast signal; producing a second stream of audio samplesrepresentative of the digital portion of the radio broadcast signal;decimating the first and second streams of audio samples to producefirst and second streams of decimated streams of audio samples;estimating a first offset value between corresponding samples in thefirst and second streams of decimated streams of audio samples, whereinthe first offset value has a first range of valid results; shifting oneof the first and second streams of audio samples by a first shift value;decimating the first and second streams of audio samples to producethird and fourth streams of decimated audio samples; estimating a secondoffset value between corresponding samples in the third and fourthstreams of decimated streams of audio samples, wherein the second offsetvalue has a second range of valid results; determining a final offsetvalue based on an intersection of the first and second ranges of validresults; and shifting one of the first and second streams of audiosamples by the final offset value to align the first and second streamsof audio samples.

In another embodiment, a radio receiver includes processing circuitryconfigured to receive a radio broadcast signal having an analog portionand a digital portion; separate the analog portion of the radiobroadcast signal from the digital portion of the radio broadcast signal;produce a first stream of audio samples representative of the analogportion of the radio broadcast signal; produce a second stream of audiosamples representative of the digital portion of the radio broadcastsignal; decimate the first and second streams of audio samples toproduce first and second streams of decimated streams of audio samples;estimate a first offset value between corresponding samples in the firstand second streams of decimated streams of audio samples, wherein thefirst offset value has a first range of valid results; shift one of thefirst and second streams of audio samples by a first shift value;decimate the first and second streams of audio samples to produce thirdand fourth streams of decimated audio samples; estimate a second offsetvalue between corresponding samples in the third and fourth streams ofdecimated streams of audio samples, wherein the second offset value hasa second range of valid results; determine a final offset value based onan intersection of the first and second ranges of valid results; andshift one of the first and second streams of audio samples by the finaloffset value to align the first and second streams of audio samples.

In another embodiment, a non-transitory, tangible computer readablemedium comprising computer program instructions adapted to cause aprocessing system to execute steps including: receiving a radiobroadcast signal having an analog portion and a digital portion;separating the analog portion of the radio broadcast signal from thedigital portion of the radio broadcast signal; producing a first streamof audio samples representative of the analog portion of the radiobroadcast signal; producing a second stream of audio samplesrepresentative of the digital portion of the radio broadcast signal;decimating the first and second streams of audio samples to producefirst and second streams of decimated streams of audio samples;estimating a first offset value between corresponding samples in thefirst and second streams of decimated streams of audio samples, whereinthe first offset value has a first range of valid results; shifting oneof the first and second streams of audio samples by a first shift value;decimating the first and second streams of audio samples to producethird and fourth streams of decimated audio samples; estimating a secondoffset value between corresponding samples in the third and fourthstreams of decimated streams of audio samples, wherein the second offsetvalue has a second range of valid results; determining a final offsetvalue based on an intersection of the first and second ranges of validresults; and shifting one of the first and second streams of audiosamples by the final offset value to align the first and second streamsof audio samples.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a functional block diagram of an exemplary digital radiobroadcast transmitter.

FIG. 2 is a functional block diagram of an exemplary digital radiobroadcast receiver in accordance with certain embodiments.

FIG. 3 is a functional block diagram that shows separate digital andanalog signal paths in a receiver.

FIG. 4 is a functional block diagram that shows elements of a timealignment module.

FIG. 5 is a flow block diagram of a method for time alignment inaccordance with certain embodiments.

DETAILED DESCRIPTION

Embodiments described herein relate to the processing of the digital andanalog components of a digital radio broadcast signal. While aspects ofthe disclosure are presented in the context of an exemplary IBOC system,it should be understood that the present disclosure is not limited toIBOC systems and that the teachings herein are applicable to other formsof digital radio broadcasting as well.

Referring to the drawings, FIG. 1 is a block diagram of an exemplarydigital radio broadcast transmitter 10 that broadcasts digital audiobroadcasting signals. The exemplary digital radio broadcast transmittermay be a DAB transmitter such as an AM or FM IBOC transmitter, forexample. An input signal source 12 provides the signal to betransmitted. The source signal may take many forms, for example, ananalog program signal that may represent voice or music and/or a digitalinformation signal that may represent message data such as trafficinformation. A baseband processor 14 processes the source signal inaccordance with various known signal processing techniques, such assource coding, interleaving and forward error correction, to producein-phase and quadrature components of a complex baseband signal on lines16 and 18, and to produce a transmitter baseband sampling clock signal20. Digital-to-analog converter (DAC) 22 converts the baseband signalsto an analog signal using the transmitter baseband sampling clock 20,and outputs the analog signal on line 24. The analog signal is shiftedup in frequency and filtered in the up-converter block 26. This producesan analog signal at an intermediate frequency f_(if) on line 28. Anintermediate frequency filter 30 rejects alias frequencies to producethe intermediate frequency signal f_(if) on line 32. A local oscillator34 produces a signal f₁₀ on line 36, which is mixed with theintermediate frequency signal on line 32 by mixer 38 to produce sum anddifference signals on line 40. The unwanted intermodulation componentsand noise are rejected by image reject filter 42 to produce themodulated carrier signal f_(c) on line 44. A high power amplifier (HPA)46 then sends this signal to an antenna 48.

In one example, a basic unit of transmission of the DAB signal is themodem frame, which is typically on the order of a second in duration.Exemplary AM and FM IBOC DAB transmission systems arrange the digitalaudio and data in units of modem frames. Some transmission systems areboth simplified and enhanced by assigning a fixed number of audio framesto each modem frame. The audio frame period is the length of timerequired to render, e.g., play back audio for a user, the samples in anaudio frame. For example, if an audio frame contains 1024 samples, andthe sampling period is 22.67 μsec, then the audio frame period would beapproximately 23.2 milliseconds. A scheduler determines the total numberof bits allocated to the audio frames within each modem frame. The modemframe duration is advantageous because it may enable sufficiently longinterleaving times to mitigate the effects of fading and short outagesor noise bursts such as may be expected in a digital audio broadcastingsystem. Therefore the main digital audio signal can be processed inunits of modem frames, and audio processing, error mitigation, andencoding strategies may be able to exploit this relatively large modemframe time without additional penalty.

In typical implementations, an audio encoder may be used to compress theaudio samples into audio frames in a manner that is more efficient androbust for transmission and reception of the IBOC signal over the radiochannel. The audio encoder encodes the audio frames using the bitallocation for each modem frame. The remaining bits in the modem frameare typically consumed by the multiplexed data and overhead. Anysuitable audio encoder can initially produce the compressed audio framessuch as an HDC encoder as developed by Coding Technologies of DolbyLaboratories, Inc., 999 Brannan Street, San Francisco, Calif. 94103-4938USA; an Advanced Audio Coding (AAC) encoder; an MPEG-1 Audio Layer 3(MP3) encoder; or a Windows Media Audio (WMA) encoder. Typical lossyaudio encoding schemes, such as AAC, MP3, and WMA, utilize the modifieddiscrete cosine transform (MDCT) for compressing audio data. MDCT basedschemes typically compress audio samples in blocks of a fixed size. Forexample, in AAC encoding, the encoder may use a single MDCT block oflength 1024 samples or 8 blocks of 128 samples. Accordingly, inimplementations using an AAC coder, for example, each audio frame couldbe comprised of a single block of 1024 audio samples, and each modemframe could include 64 audio frames. In other typical implementations,each audio frame could be comprised of a single block of 2048 audiosamples, and each modem frame could include 32 audio frames. Any othersuitable combination of sample block sizes and audio frames per modemframe could be utilized.

In an exemplary IBOC DAB system, the broadcast signal includes mainprogram service (MPS) audio, MPS data (MPSD), supplemental programservice (SPS) audio, and SPS data (SPSD). MPS audio serves as the mainaudio programming source. In hybrid modes, it preserves the existinganalog radio programming formats in both the analog and digitaltransmissions. MPSD, also known as program service data (PSD), includesinformation such as music title, artist, album name, etc. Supplementalprogram service can include supplementary audio content as well as PSD.Station Information Service (SIS) is also provided, which comprisesstation information such as call sign, absolute time, positioncorrelated to GPS, and data describing the services available on thestation. In certain embodiments, Advanced Applications Services (AAS)may be provided that include the ability to deliver many data servicesor streams and application specific content over one channel in the AMor FM spectrum, and enable stations to broadcast multiple streams onsupplemental or sub-channels of the main frequency.

A digital radio broadcast receiver performs the inverse of some of thefunctions described for the transmitter. FIG. 2 is a block diagram of anexemplary digital radio broadcast receiver 50. The exemplary digitalradio broadcast receiver 50 may be a DAB receiver such as an AM or FMIBOC receiver, for example. The DAB signal is received on antenna 52. Abandpass preselect filter 54 passes the frequency band of interest,including the desired signal at frequency f_(c), but rejects the imagesignal at f_(c)−2f_(if) (for a low side lobe injection localoscillator). Low noise amplifier (LNA) 56 amplifies the signal. Theamplified signal is mixed in mixer 58 with a local oscillator signalf_(lo) supplied on line 60 by a tunable local oscillator 62. Thiscreates sum (f_(c)+f_(lo)) and difference (f_(c)−f_(lo)) signals on line64. Intermediate frequency filter 66 passes the intermediate frequencysignal f_(if) and attenuates frequencies outside of the bandwidth of themodulated signal of interest. An analog-to-digital converter (ADC) 68operates using the front-end clock 70 to produce digital samples on line72. Digital down converter 74 frequency shifts, filters and decimatesthe signal to produce lower sample rate in-phase and quadrature signalson lines 76 and 78. The digital down converter 74 also outputs areceiver baseband sampling clock signal 80. A baseband processor 82,operating using the master clock 84 that may or may not be generatedfrom the same oscillator as the front-end clock 70, then providesadditional signal processing. The baseband processor 82 produces outputaudio samples on line 86 for output to audio sink 88. The output audiosink may be any suitable device for rendering audio such as anaudio-video receiver or car stereo system.

FIG. 3 is a functional block diagram that shows separate digital andanalog signal paths in a receiver. A hybrid radio broadcast signal isreceived on antenna 52, and is converted to a digital signal in ADC 68.The hybrid signal is then split into a digital signal path 90 and ananalog signal path 92. In the digital signal path 90, the digital signalis acquired, demodulated, and decoded into digital audio samples asdescribed in more detail below. The digital signal spends an amount oftime T_(DIGITAL) in the digital signal path 90, which is a variableamount of time that will depend on the acquisition time of the digitalsignal and the demodulation and decoding times of the digital signalpath. The acquisition time can vary depending on the strength of thedigital signal due to radio propagation interference such as fading andmultipath.

In contrast, the analog signal (i.e., the digitized analog audiosamples) spends an amount of time T_(ANALOG) in the analog signal path92. T_(ANALOG) is typically a constant amount of time that isimplementation dependent. It should be noted that the analog signal path92 may be co-located with the digital signal path on the basebandprocessor 82 or separately located on an independent analog processingchip. Since the time spent traveling through the digital signal pathT_(DIGITAL) and the analog signal path T_(ANALOG) may be different, itis desirable to align the samples from the digital signal with thesamples from the analog signal within a predetermined amount so thatthey can be smoothly combined in the audio transition module 94. Thealignment accuracy will preferably be chosen to minimize theintroduction of audio distortions when blending from analog to digitaland visa versa. The digital and analog signals are combined and travelthrough the audio transition module 94. Then the combined digitizedaudio signal is converted into analog for rendering via thedigital-to-analog converter (DAC) 96. As used in this description,references to “analog” or “digital” with regard to a particular datasample streams in this disclosure connote the radio signal from whichthe sample stream was extracted, as both data streams are in a digitalformat for the processing described herein.

One technique for determining time alignment between signals in digitaland analog pathways performs a correlation between the samples of thetwo audio streams and looks for the peak of the correlation. Timesamples of digital and analog audio are compared as one sample stream isshifted in time against the other. The alignment error can be calculatedby successively applying offsets to the sample steams until thecorrelation peaks. The time offset between the two samples at peakcorrelation is the alignment error. Once the alignment error has beendetermined, the timing of the digital and/or analog audio samples can beadjusted to allow smooth blending of the digital and analog audio.

For an n point correlation, there are n² multiplies and the memoryrequirement is 2n samples for each stream, or 4 n total samples. For asearch range of 0.5 seconds and a sample rate of 44.1 k this requiresapproximately 487 million multiplies and 88 kBytes of memory. Theaccuracy of this technique is ±1 sample. In order to reduce the numberof multiplies and the memory required many systems downsample theincoming audio streams and perform the correlation on the downsampleddata. If the data is downsampled by 5, the total number of samples isreduced by ⅕ and the total number of multiplies is reduced by 1/25. Thetradeoff is in resolution which is then ±2.5 samples of accuracy.

It would be desirable to have a method and apparatus for determiningoffset between analog and digital audio streams within a desiredaccuracy using downsampled audio streams.

In one embodiment, the detection and adjustment of the delay between thedata streams as initially received may be performed by an alignmentestimation module. The alignment estimation module may be implementedusing one or more processors or other circuitry to detect which of thetwo data streams is leading, and to determine the amount of time offsetbetween them. The time offset may be determined based on a number ofsamples that is a small fraction of the overall number of samples ineach data stream. Based on the detected time offset, the alignmentestimation module may generate one or more control signals that causethe alignment to be adjusted, and more particularly, to be reduced. Theadjustment of the alignment may be performed by various methods, such asvarying the sampling rate of one or more sample rate converters, oradjusting a pointer separation in a first-in first-out memory. Thealignment may also be adjusted continuously or incrementally at a ratesufficiently slow so as to avoid audio artifacts if the analog samplestream leads the digital sample stream. The alignment estimation modulemay cease adjustments when the sample streams are sufficiently aligned,and provide a signal to a blend unit indicating that a blend operationmay commence.

FIG. 4 is a functional block diagram of an apparatus for determiningoffset between analog and digital audio streams within a desiredaccuracy using downsampled audio streams. In the embodiment of FIG. 4,the digital signal path 90 supplies a first stream of samplesrepresentative of the content of the received digitally modulated signalon line 100. The samples from the first sample stream are stored inbuffer 102. The first stream of samples on line 104 is filtered by ananti-aliasing filter 106 and downsampled (decimated) as shown in block108 to produce a first decimated sample stream on line 110. The analogsignal path 92 supplies a second stream of samples representative of thecontent of the received analog modulated signal on line 112. Samplesfrom the second stream of samples are stored in buffer 114. The secondstream of samples on line 116 is filtered by an anti-aliasing filter 118and downsampled (decimated) as shown in block 120 to produce a seconddecimated sample stream on line 122. A correlator 124 performs across-correlation on samples of the first and second decimated samplestreams and a peak detector 126 determines an offset between samples ofthe decimated streams that are most highly correlated. Due to thedecimation of the input signals, the peak detector output actuallyrepresents a range of possible stream offsets. This offset range is thenused to determine a shift value for one of the first and second samplestreams, as illustrated in block 128. Then the shifted sample stream isdecimated and correlated with the decimated samples from the unshiftedstream. By running the estimation multiple times with a shifted input,the range of valid results is now limited to the intersection of therange of valid results of the first estimation and the range of validresults of the second estimation. The steps of shifting, decimating,correlating and peak detection can be repeated until a desired accuracyof the time alignment of the first and second sample streams isachieved. At that point, a control signal is output on line 130. Thenthe blend control 132 can use the control signal to blend the analog anddigital signal paths.

The correlation operation performed by the correlator may includemultiplying together decimated data from each stream. The result of themultiplication may appear as noise, with a large peak when the datastreams are aligned in time.

In the embodiment shown, the peak detector may analyze correlationresults over time to search for peaks that indicate that the digitaldata streams are aligned in time. In some embodiments, a squaringfunction may square the product output by the correlator in order tofurther emphasize the peaks. Based on the received data, the peak searchunit may output an indication of the relative delay between the analogdata stream and the digital data stream. The indication of relativedelay may include an indication of which one of the two data streams isleading the other.

Once the analog and digital data streams are sufficiently aligned, ablend operation may begin. The blend operation may be conducted aspreviously described, reducing the contribution of the analog datastream to the output audio while correspondingly increasing thecontribution of the digital data stream until the latter is theexclusive source.

FIG. 5 is a flow diagram of one embodiment of a method for determiningrelative time offset between two data streams extracted from a radiosimulcast. While the method of FIG. 5 may be implemented by theapparatus shown in FIG. 4 and described herein, other hardwareembodiments, as well as software embodiments and combinations thereof,may also be used to implement the method.

FIG. 5 shows an analog sample stream in block 140 and a digital samplestream in block 142. The analog sample stream is filtered by ananti-aliasing filter in block 144 and decimated in block 146 to producea decimated analog sample stream on line 148. The digital sample streamis filtered by an anti-aliasing filter in block 150 and decimated inblock 152 to produce a decimated digital sample stream on line 154.Prior to decimation, an anti-aliasing filter is required. A correlationand peak detection operation is performed on the decimated analog anddigital sample streams in block 156. This produces an offset valuerepresentative of the offset between the decimated analog and digitalsample streams, as shown in block 158. If this offset value has beendetermined to a desired accuracy (block 160) then the offset value isoutput to block 162. If this offset value has not been determined to adesired accuracy (block 160) then a sample shift value is set in block164, and one of the original sample streams (in the example of FIG. 5,the digital sample stream) is shifted by the shift value and thecorrelation and peak detection is repeated using the shifted digitalsample stream.

The correlation algorithm is run multiple times to achieve a desiredaccuracy, for example ±1 sample. Each time the algorithm is run, thestarting point of one of the streams is offset by an amount determinedby the current result.

In one embodiment, a method for processing a radio signal includesreceiving a radio broadcast signal having an analog portion and adigital portion; separating the analog portion of the radio broadcastsignal from the digital portion of the radio broadcast signal; producinga first stream of audio samples representative of the analog portion ofthe radio broadcast signal; producing a second stream of audio samplesrepresentative of the digital portion of the radio broadcast signal;decimating the first and second streams of audio samples to producefirst and second streams of decimated streams of audio samples;estimating a first offset value between corresponding samples in thefirst and second streams of decimated streams of audio samples, whereinthe first offset value has a first range of valid results; shifting oneof the first and second streams of audio samples by a first shift value;decimating the first and second streams of audio samples to producethird and fourth streams of decimated audio samples; estimating a secondoffset value between corresponding samples in the third and fourthstreams of decimated streams of audio samples, wherein the second offsetvalue has a second range of valid results; determining a final offsetvalue based on an intersection of the first and second ranges of validresults; and shifting one of the first and second streams of audiosamples by the final offset value to align the first and second streamsof audio samples.

As a specific example, assume that the sample streams are decimated by afactor of 4. The correlation has an error of ±2 samples relative to thepre-decimated sample streams. By shifting the input data and running theestimation a second time the correlation error can be reduced to ±1sample.

-   -   An example that runs the algorithm two times to achieve an        accuracy of ±1 sample follows. Assume that after the 1st run the        result is that the digital stream is +4 samples ahead of the        analog stream. The range of valid results is therefore +2        samples ahead and +6 samples ahead (i.e. result=4±2 samples        accuracy).

// For the 2nd run, advance the digital starting point by 2 samples. //The range of valid results is shifted and is now between // +4 and +8samples if (2nd run result = +4) { // The range of valid results for a+4 answer is +2 to +6. // However, from the first estimation it must be+4 to +8 // The intersection of these is +4 to +6 which is the new validrange // Therefore, selecting a final result of 5 has an error of +/−1samples } else if (2nd run result = + 8) { // The range of valid resultsfor a +8 answer is +6 to +10. // However, from the first estimation itmust be +4 to +8 // The intersection of these is +6 to +8 which is thenew valid range // Therefore, selecting a final result of 7 has an errorof +/−1 sample }

Since this algorithm is run twice, the total number of multiplies is2*((n/4)²)=0.125*n² compared to n², which represents an 87.5% savings.The total memory required is (2*(n/4)) compared to (2*n) samples,representing a 75% savings of memory. The described example achieves ahigher resolution time alignment using a downsample by 4, and runningthe algorithm multiple times for consistency.

The number of samples to shift for each successive estimation is bestdetermined by placing the valid result range of an estimation betweentwo valid answers for the next estimation. Using the example above, thevalid result range after the first estimation is +2 to +6 samples. Forthe next estimation, the possible valid answers are 0, 4, 8, etc. Byshifting the input up 2 samples, the valid range for the secondestimation is now +4 to +8, equally between two possible valid answersof the second estimation. By shifting the input to realign the validresult range, the result range of subsequent estimations will intersectthe initial result range and limit the possible valid results.

As an alternative, a shift of −2 samples could have been used whichwould shift the range of possible results down 0 to +4, again equallybetween two possible results of the second estimation

An extension of this methodology would be to change the decimation ratioof the input samples in subsequent estimations. This could enableadditional savings in multiplies and memory.

In another embodiment, a radio receiver includes processing circuitryconfigured to receive a radio broadcast signal having an analog portionand a digital portion; separate the analog portion of the radiobroadcast signal from the digital portion of the radio broadcast signal;produce a first stream of audio samples representative of the analogportion of the radio broadcast signal; produce a second stream of audiosamples representative of the digital portion of the radio broadcastsignal; decimate the first and second streams of audio samples toproduce first and second streams of decimated streams of audio samples;estimate a first offset value between corresponding samples in the firstand second streams of decimated streams of audio samples, wherein thefirst offset value has a first range of valid results; shift one of thefirst and second streams of audio samples by a first shift value;decimate the first and second streams of audio samples to produce thirdand fourth streams of decimated audio samples; estimate a second offsetvalue between corresponding samples in the third and fourth streams ofdecimated streams of audio samples, wherein the second offset value hasa second range of valid results; determine a final offset value based onan intersection of the first and second ranges of valid results; andshift one of the first and second streams of audio samples by the finaloffset value to align the first and second streams of audio samples.

In another embodiment, a non-transitory, tangible computer readablemedium comprising computer program instructions adapted to cause aprocessing system to execute steps including: receiving a radiobroadcast signal having an analog portion and a digital portion;separating the analog portion of the radio broadcast signal from thedigital portion of the radio broadcast signal; producing a first streamof audio samples representative of the analog portion of the radiobroadcast signal; producing a second stream of audio samplesrepresentative of the digital portion of the radio broadcast signal;decimating the first and second streams of audio samples to producefirst and second streams of decimated streams of audio samples;estimating a first offset value between corresponding samples in thefirst and second streams of decimated streams of audio samples, whereinthe first offset value has a first range of valid results; shifting oneof the first and second streams of audio samples by a first shift value;decimating the first and second streams of audio samples to producethird and fourth streams of decimated audio samples; estimating a secondoffset value between corresponding samples in the third and fourthstreams of decimated streams of audio samples, wherein the second offsetvalue has a second range of valid results; determining a final offsetvalue based on an intersection of the first and second ranges of validresults; and shifting one of the first and second streams of audiosamples by the final offset value to align the first and second streamsof audio samples.

The method and apparatus described herein may be implemented with thevarious embodiments of a radio receiver and processes performed thereinas discussed above, and may be utilized with various other hardwareand/or software embodiments not explicitly discussed herein.

In existing hybrid digital radios, after tuning to a station analogaudio is initially played while digital audio is being acquired. Afterdigital audio acquisition a blend occurs whereby digital audio is outputand analog audio is no longer played. Without the method described abovedigital audio will be played immediately upon acquisition, however, thetwo audio streams may not be aligned causing an echo to be heard whenswitching from analog audio to digital audio. Including the timealignment described above will delay the transition to digital audiowhile guaranteeing a seamless transition for the listener

While the invention has been described in terms of several embodiments,it will be apparent to those skilled in the art that various changes canbe made to the disclosed embodiments without departing from the scope ofthe invention as defined by the following claims. The embodimentsdescribed above and other embodiments are within the scope of theclaims.

What is claimed is:
 1. A method comprising: receiving a radio broadcastsignal having an analog portion and a digital portion; separating theanalog portion of the radio broadcast signal from the digital portion ofthe radio broadcast signal; producing a first stream of audio samplesrepresentative of the analog portion of the radio broadcast signal;producing a second stream of audio samples representative of the digitalportion of the radio broadcast signal; decimating the first and secondstreams of audio samples to produce first and second streams ofdecimated audio samples; estimating a first offset value betweencorresponding samples in the first and second streams of decimated audiosamples, wherein the first offset value has a first range of validresults; shifting one of the first and second streams of audio samplesby a first shift value within the first range of valid results;decimating the first and second streams of audio samples to producethird and fourth streams of decimated audio samples; estimating a secondoffset value between corresponding samples in the third and fourthstreams of decimated audio samples, wherein the second offset value hasa second range of valid results; determining a final offset value basedon an intersection of the first and second ranges of valid results; andshifting one of the first and second streams of audio samples by thefinal offset value to align the first and second streams of audiosamples.
 2. The method of claim 1, wherein the first shift value isselected such that the first range of valid results is between two validresults for the second offset.
 3. The method of claim 1, wherein thefirst shift value is selected such that the first and second ranges ofvalid results intersect.
 4. The method of claim 1, further comprising:blending the first and second streams of audio samples to produce anaudio output.
 5. The method of claim 1, further comprising: shifting oneof the first and second streams of audio samples by a second offsetvalue within the second range of valid results; decimating the first andsecond streams of audio samples to produce fifth and sixth streams ofdecimated audio samples; and estimating a third offset value betweencorresponding samples in the fifth and sixth streams of decimated audiosamples, wherein the third offset value has a third range of validresults; wherein the step of determining a final offset value is basedon an intersection of the first and second ranges of valid results andthe third range of valid results.
 6. The method of claim 1, wherein: thesteps of decimating the first and second streams of audio samples toproduce first and second streams of decimated audio samples, anddecimating the first and second streams of audio samples to producethird and fourth streams of decimated audio samples, are preformed atdifferent decimation rates.
 7. The method of claim 5, furthercomprising: blending the first and second streams of audio samples toproduce an audio output.
 8. A radio receiver comprising: processingcircuitry configured to: receive a radio broadcast signal having ananalog portion and a digital portion; separate the analog portion of theradio broadcast signal from the digital portion of the radio broadcastsignal; produce a first stream of audio samples representative of theanalog portion of the radio broadcast signal; produce a second stream ofaudio samples representative of the digital portion of the radiobroadcast signal; decimate the first and second streams of audio samplesto produce first and second streams of decimated audio samples; estimatea first offset value between corresponding samples in the first andsecond streams of decimated audio samples, wherein the first offsetvalue has a first range of valid results; shift one of the first andsecond streams of audio samples by a first shift value within the firstrange of valid results; decimate the first and second streams of audiosamples to produce third and fourth streams of decimated audio samples;estimate a second offset value between corresponding samples in thethird and fourth streams of decimated audio samples, wherein the secondoffset value has a second range of valid results; determine a finaloffset value based on an intersection of the first and second ranges ofvalid results; and shift one of the first and second streams of audiosamples by the final offset value to align the first and second streamsof audio samples.
 9. The radio receiver of claim 8, wherein the receiveris further configured to select the first shift value such that thefirst range of valid results is between two valid results for the secondoffset.
 10. The radio receiver of claim 8, wherein the receiver isfurther configured to select the first shift value such that the firstand second ranges of valid results intersect.
 11. The radio receiver ofclaim 8, wherein the receiver is further configured to blend the firstand second streams of audio samples to produce an audio output.
 12. Theradio receiver of claim 8, wherein the receiver is further configuredto: shift one of the first and second streams of audio samples by asecond offset value within the second range of valid results; decimatethe first and second streams of audio samples to produce fifth and sixthstreams of decimated audio samples; and estimate a third offset valuebetween corresponding samples in the fifth and sixth streams ofdecimated audio samples, wherein the third offset value has a thirdrange of valid results; wherein the step of determining a final offsetvalue is based on an intersection of the first and second ranges ofvalid results and the third range of valid results.
 13. The radioreceiver of claim 8, wherein the receiver is further configured toperform the functions of decimating the first and second streams ofaudio samples to produce first and second streams of decimated audiosamples, and decimating the first and second streams of audio samples toproduce third and fourth streams of decimated audio samples, atdifferent decimation rates.
 14. The radio receiver of claim 12, whereinthe receiver is further configured to blend the first and second streamsof audio samples to produce an audio output.
 15. A non-transitory,tangible computer readable medium comprising computer programinstructions adapted to cause a processing system to execute stepscomprising: receiving a radio broadcast signal having an analog portionand a digital portion; separating the analog portion of the radiobroadcast signal from the digital portion of the radio broadcast signal;producing a first stream of audio samples representative of the analogportion of the radio broadcast signal; producing a second stream ofaudio samples representative of the digital portion of the radiobroadcast signal; decimating the first and second streams of audiosamples to produce first and second streams of decimated audio samples;estimating a first offset value between corresponding samples in thefirst and second streams of decimated audio samples, wherein the firstoffset value has a first range of valid results; shifting one of thefirst and second streams of audio samples by a first shift value withinthe first range of valid results; decimating the first and secondstreams of audio samples to produce third and fourth streams ofdecimated audio samples; estimating a second offset value betweencorresponding samples in the third and fourth streams of decimated audiosamples, wherein the second offset value has a second range of validresults; determining a final offset value based on an intersection ofthe first and second ranges of valid results; and shifting one of thefirst and second streams of audio samples by the final offset value toalign the first and second streams of audio samples.
 16. The computerreadable medium of claim 15, wherein the computer program instructionsare further adapted to cause a processing system to select the firstshift value such that the first range of valid results is between twovalid results for the second offset.
 17. The computer readable medium ofclaim 15, wherein the computer program instructions are further adaptedto cause a processing system to select the first shift value such thatthe first and second ranges of valid results intersect.
 18. The computerreadable medium of claim 15, wherein the computer program instructionsare further adapted to cause a processing system to blend the first andsecond streams of audio samples to produce an audio output.
 19. Thecomputer readable medium of claim 15, wherein the computer programinstructions are further adapted to cause a processing system to: shiftone of the first and second streams of audio samples by a second offsetvalue within the second range of valid results; decimate the first andsecond streams of audio samples to produce fifth and sixth streams ofdecimated audio samples; and estimating a third offset value betweencorresponding samples in the fifth and sixth streams of decimated audiosamples, wherein the third offset value has a third range of validresults; wherein the step of determining a final offset value is basedon an intersection of the first and second ranges of valid results andthe third range of valid results.
 20. The computer readable medium ofclaim 19, wherein the computer program instructions are further adaptedto cause a processing system to: decimate the first and second streamsof audio samples to produce first and second streams of decimated audiosamples, and decimate the first and second streams of audio samples toproduce third and fourth streams of decimated audio samples, atdifferent decimation rates.